# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Analytics.V3.Model.UnsampledReport do
  @moduledoc """
  JSON template for Analytics unsampled report resource.

  ## Attributes

  *   `accountId` (*type:* `String.t`, *default:* `nil`) - Account ID to which this unsampled report belongs.
  *   `cloudStorageDownloadDetails` (*type:* `GoogleApi.Analytics.V3.Model.UnsampledReportCloudStorageDownloadDetails.t`, *default:* `nil`) - Download details for a file stored in Google Cloud Storage.
  *   `created` (*type:* `DateTime.t`, *default:* `nil`) - Time this unsampled report was created.
  *   `dimensions` (*type:* `String.t`, *default:* `nil`) - The dimensions for the unsampled report.
  *   `downloadType` (*type:* `String.t`, *default:* `nil`) - The type of download you need to use for the report data file. Possible values include `GOOGLE_DRIVE` and `GOOGLE_CLOUD_STORAGE`. If the value is `GOOGLE_DRIVE`, see the `driveDownloadDetails` field. If the value is `GOOGLE_CLOUD_STORAGE`, see the `cloudStorageDownloadDetails` field.
  *   `driveDownloadDetails` (*type:* `GoogleApi.Analytics.V3.Model.UnsampledReportDriveDownloadDetails.t`, *default:* `nil`) - Download details for a file stored in Google Drive.
  *   `end-date` (*type:* `String.t`, *default:* `nil`) - The end date for the unsampled report.
  *   `filters` (*type:* `String.t`, *default:* `nil`) - The filters for the unsampled report.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Unsampled report ID.
  *   `kind` (*type:* `String.t`, *default:* `analytics#unsampledReport`) - Resource type for an Analytics unsampled report.
  *   `metrics` (*type:* `String.t`, *default:* `nil`) - The metrics for the unsampled report.
  *   `profileId` (*type:* `String.t`, *default:* `nil`) - View (Profile) ID to which this unsampled report belongs.
  *   `segment` (*type:* `String.t`, *default:* `nil`) - The segment for the unsampled report.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - Link for this unsampled report.
  *   `start-date` (*type:* `String.t`, *default:* `nil`) - The start date for the unsampled report.
  *   `status` (*type:* `String.t`, *default:* `nil`) - Status of this unsampled report. Possible values are PENDING, COMPLETED, or FAILED.
  *   `title` (*type:* `String.t`, *default:* `nil`) - Title of the unsampled report.
  *   `updated` (*type:* `DateTime.t`, *default:* `nil`) - Time this unsampled report was last modified.
  *   `webPropertyId` (*type:* `String.t`, *default:* `nil`) - Web property ID to which this unsampled report belongs. The web property ID is of the form UA-XXXXX-YY.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accountId => String.t() | nil,
          :cloudStorageDownloadDetails =>
            GoogleApi.Analytics.V3.Model.UnsampledReportCloudStorageDownloadDetails.t() | nil,
          :created => DateTime.t() | nil,
          :dimensions => String.t() | nil,
          :downloadType => String.t() | nil,
          :driveDownloadDetails =>
            GoogleApi.Analytics.V3.Model.UnsampledReportDriveDownloadDetails.t() | nil,
          :"end-date" => String.t() | nil,
          :filters => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :metrics => String.t() | nil,
          :profileId => String.t() | nil,
          :segment => String.t() | nil,
          :selfLink => String.t() | nil,
          :"start-date" => String.t() | nil,
          :status => String.t() | nil,
          :title => String.t() | nil,
          :updated => DateTime.t() | nil,
          :webPropertyId => String.t() | nil
        }

  field(:accountId)

  field(:cloudStorageDownloadDetails,
    as: GoogleApi.Analytics.V3.Model.UnsampledReportCloudStorageDownloadDetails
  )

  field(:created, as: DateTime)
  field(:dimensions)
  field(:downloadType)

  field(:driveDownloadDetails,
    as: GoogleApi.Analytics.V3.Model.UnsampledReportDriveDownloadDetails
  )

  field(:"end-date")
  field(:filters)
  field(:id)
  field(:kind)
  field(:metrics)
  field(:profileId)
  field(:segment)
  field(:selfLink)
  field(:"start-date")
  field(:status)
  field(:title)
  field(:updated, as: DateTime)
  field(:webPropertyId)
end

defimpl Poison.Decoder, for: GoogleApi.Analytics.V3.Model.UnsampledReport do
  def decode(value, options) do
    GoogleApi.Analytics.V3.Model.UnsampledReport.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Analytics.V3.Model.UnsampledReport do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
